package com.cskaoyan.controller.admin.indexcontroller;

import com.cskaoyan.service.indexservice.IndexService;
import com.cskaoyan.vo.BaseRespVo;
import com.cskaoyan.vo.indexvo.IndexVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author hsp
 * @date 2021/5/11 16:57
 */
@RestController
public class IndexController {

    @Autowired
    IndexService indexService;

    @RequestMapping("admin/dashboard")
    public BaseRespVo index(){
       IndexVo indexVo = indexService.getIndex();
        return BaseRespVo.ok(indexVo);
    }
}
